package com.abc.tacos.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author Kar
 * @version 1.0
 * @date 2022/4/16 16:00
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("home");
        registry.addViewController("/Asuka")/*.setViewName("Asuka")*/;
        registry.addViewController("/login")/*.setViewName("login")*/; // -> 转到登录页"login.html"
    }
}
